package data.entity;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author fank
 * @date 2018-08-23 15:09
 * @desc
 **/
@Entity
@Table(catalog = "dyht", name = "record_game")
public class GameRecord {
    /**玩家id ，roomId 复合组键*/
    @EmbeddedId
    private PK key;
    /** 剩余免费次数*/
    private int freeCount = 0;
    /** 免费中赢取的总金币*/
    private long freeMoney = 0;
    /** 剩余未完成的小游戏*/
    @Lob
    private String mgames;
    /** 上一轮下注索引*/
    private int betIndex;
    /** 上一轮连击*/
    private int combo;
    /** 最后更新时间*/
    private Date lastUpdate = new Date();
    /** 已经购买次数*/
    private int buyTime;

    public GameRecord() {
    }

    public GameRecord(PK key) {
        this.key = key;
    }

    public PK getKey() {
        return key;
    }

    public void setKey(PK key) {
        this.key = key;
    }

    public int getFreeCount() {
        return freeCount;
    }

    public void setFreeCount(int freeCount) {
        this.freeCount = freeCount;
    }

    public String getMgames() {
        return mgames;
    }

    public void setMgames(String mgames) {
        this.mgames = mgames;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    public long getFreeMoney() {
        return freeMoney;
    }

    public void setFreeMoney(long freeMoney) {
        this.freeMoney = freeMoney;
    }

    public int getBetIndex() {
        return betIndex;
    }

    public void setBetIndex(int betIndex) {
        this.betIndex = betIndex;
    }

    public int getCombo() {
        return combo;
    }

    public void setCombo(int combo) {
        this.combo = combo;
    }

    public int getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(int buyTime) {
        this.buyTime = buyTime;
    }
}
